\(\int \frac {\csc ^3(x)}{i+\cot (x)} \, dx\) [7]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 12 \[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=i \text {arctanh}(\cos (x))-\csc (x) \]

[Out]

I*arctanh(cos(x))-csc(x)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3582, 3855} \[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=-\csc (x)+i \text {arctanh}(\cos (x)) \]

[In]

Int[Csc[x]^3/(I + Cot[x]),x]

[Out]

I*ArcTanh[Cos[x]] - Csc[x]

Rule 3582

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d^2*(
d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + n - 1))), x] + Dist[d^2*((m - 2)/(a*(m + n - 1
))), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2
 + b^2, 0] && LtQ[n, 0] && GtQ[m, 1] &&  !ILtQ[m + n, 0] && NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = -\csc (x)-i \int \csc (x) \, dx \\ & = i \text {arctanh}(\cos (x))-\csc (x) \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(26\) vs. \(2(12)=24\).

Time = 0.18 (sec) , antiderivative size = 26, normalized size of antiderivative = 2.17 \[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=-\csc (x)+i \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \]

[In]

Integrate[Csc[x]^3/(I + Cot[x]),x]

[Out]

-Csc[x] + I*(Log[Cos[x/2]] - Log[Sin[x/2]])

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (11 ) = 22\).

Time = 0.08 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.00

method result size
default \(-\frac {\tan \left (\frac {x}{2}\right )}{2}-i \ln \left (\tan \left (\frac {x}{2}\right )\right )-\frac {1}{2 \tan \left (\frac {x}{2}\right )}\) \(24\)
risch \(-\frac {2 i {\mathrm e}^{i x}}{{\mathrm e}^{2 i x}-1}+i \ln \left ({\mathrm e}^{i x}+1\right )-i \ln \left ({\mathrm e}^{i x}-1\right )\) \(41\)

[In]

int(csc(x)^3/(I+cot(x)),x,method=_RETURNVERBOSE)

[Out]

-1/2*tan(1/2*x)-I*ln(tan(1/2*x))-1/2/tan(1/2*x)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 48 vs. \(2 (10) = 20\).

Time = 0.26 (sec) , antiderivative size = 48, normalized size of antiderivative = 4.00 \[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=\frac {{\left (i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) + {\left (-i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) - 2 i \, e^{\left (i \, x\right )}}{e^{\left (2 i \, x\right )} - 1} \]

[In]

integrate(csc(x)^3/(I+cot(x)),x, algorithm="fricas")

[Out]

((I*e^(2*I*x) - I)*log(e^(I*x) + 1) + (-I*e^(2*I*x) + I)*log(e^(I*x) - 1) - 2*I*e^(I*x))/(e^(2*I*x) - 1)

Sympy [F]

\[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=\int \frac {\csc ^{3}{\left (x \right )}}{\cot {\left (x \right )} + i}\, dx \]

[In]

integrate(csc(x)**3/(I+cot(x)),x)

[Out]

Integral(csc(x)**3/(cot(x) + I), x)

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (10) = 20\).

Time = 0.21 (sec) , antiderivative size = 33, normalized size of antiderivative = 2.75 \[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=-\frac {\cos \left (x\right ) + 1}{2 \, \sin \left (x\right )} - \frac {\sin \left (x\right )}{2 \, {\left (\cos \left (x\right ) + 1\right )}} - i \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \]

[In]

integrate(csc(x)^3/(I+cot(x)),x, algorithm="maxima")

[Out]

-1/2*(cos(x) + 1)/sin(x) - 1/2*sin(x)/(cos(x) + 1) - I*log(sin(x)/(cos(x) + 1))

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 30 vs. \(2 (10) = 20\).

Time = 0.25 (sec) , antiderivative size = 30, normalized size of antiderivative = 2.50 \[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=-\frac {-2 i \, \tan \left (\frac {1}{2} \, x\right ) + 1}{2 \, \tan \left (\frac {1}{2} \, x\right )} - i \, \log \left (\tan \left (\frac {1}{2} \, x\right )\right ) - \frac {1}{2} \, \tan \left (\frac {1}{2} \, x\right ) \]

[In]

integrate(csc(x)^3/(I+cot(x)),x, algorithm="giac")

[Out]

-1/2*(-2*I*tan(1/2*x) + 1)/tan(1/2*x) - I*log(tan(1/2*x)) - 1/2*tan(1/2*x)

Mupad [B] (verification not implemented)

Time = 12.73 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.92 \[ \int \frac {\csc ^3(x)}{i+\cot (x)} \, dx=-\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{2}-\frac {1}{2\,\mathrm {tan}\left (\frac {x}{2}\right )}-\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i} \]

[In]

int(1/(sin(x)^3*(cot(x) + 1i)),x)

[Out]

- tan(x/2)/2 - log(tan(x/2))*1i - 1/(2*tan(x/2))